<?php
	class Controller {
		var $name = 'Controller';
		function Controller() {
		}
		function render($view, $data = array()) {
			if(!$this->_viewExists($view))
				return false;
			include VIEWS_PATH . "$view.php";
		}
		function loadModel($model) {
			ModelLoader::load($model);
		}
		function _viewExists($view){
			
			if(!file_exists(VIEWS_PATH."$view.php")) {
				echo "<br><center>The view <em>$view</em> in controller"
				." <em>{$this->name}</em> does not exist</center>";
				return false;
			}
			return true;
		}
	}
?>